<?php
include('../../inc/global.inc');
include("../islogin.php");
$url="jie_dai.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=20;
?>
<?php
//删除信息
if($_GET['del_act']){
$urls=$_SERVER['HTTP_REFERER'];
@mysql_query("delete from member where id='".$_GET['del_id']."'");
@mysql_query("delete from p_list where member_id='".$_GET['del_id']."'");
@mysql_query("delete from product where member_id='".$_GET['del_id']."'");
@mysql_query("delete from hot_pro_list where member_id='".$_GET['del_id']."'");
@mysql_query("delete from job_post where member_id='".$_GET['del_id']."'");
@mysql_query("delete from jd_fangdai where member_id='".$_GET['del_id']."'");
@mysql_query("delete from jm_list where member_id='".$_GET['del_id']."'");
@mysql_query("delete from photo where member_id='".$_GET['del_id']."'");

echo "<script>location='".$urls."';</script>";
}
?>
<HTML>
<HEAD>
<TITLE>Admin</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<LINK href="../css/css.css" rel=stylesheet>
<script type='text/javascript' src="../js/islogin.js" charset="gb2312"></script>
</HEAD>
<BODY>
<center>
  <table width="95%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td height="25" bgcolor="#EEEEF9" style="padding-left:5px;">借贷企业&nbsp;&nbsp;<a href="javascript:history.go(-1)">返回</a></td>
    </tr>
  </table>
  <table width="95%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="5"></td>
    </tr>
  </table>
  <table width="95%" border="0" cellspacing="0" cellpadding="0">
  <form method="get" action="">
    <tr>
      <td height="25">是否完善企业信息<input name="m_static" type="checkbox" value="1" <?php if($_GET[m_static]==1){echo "checked";}?>>&nbsp;&nbsp;&nbsp;&nbsp;是否通过审核<input type="checkbox" name="m_sh" value="1" <?php if($_GET[m_sh]==1){echo "checked";}?>>&nbsp;&nbsp;<input type="submit" value="提交"></td>
    </tr>
  </form>
  </table>
<table width="95%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr>
      <td width="6%" height="30" align="center" bgcolor="#8DA8CF">编号</td>
      <td width="12%" align="center" bgcolor="#8DA8CF">账号</td>
      <td width="28%" align="center" bgcolor="#8DA8CF">公司名称</td>
      <td width="9%" align="center" bgcolor="#8DA8CF">城市</td>
      <td width="11%" align="center" bgcolor="#8DA8CF">联系人</td>
      <td width="24%" align="center" bgcolor="#8DA8CF">注册时间</td>
      <td width="10%" align="center" bgcolor="#8DA8CF">管理</td>
    </tr>
<?php
if($_GET[m_static]){
$sqls=" and m_static='$_GET[m_static]'";
}
if($_GET[m_sh]==1){
$sqls.=" and m_sh='$_GET[m_sh]'";
}

$sql="select id,m_user,m_cname,city,m_name,m_addtime from member where jd_is=1 and m_sh=0 and m_mode=1 ".$sqls." order by id desc limit ".($thepage-1)*$maxpage.",$maxpage";
$rs=@mysql_query($sql);
$i=1;
while($row=@mysql_fetch_array($rs)){
$color=($i%2)?"#FFFFFF":"#eeeeee";
?>
    <tr bgcolor=<?=$color?>>
      <td height="25" align="center"><?=$i?></td>
	  <td align="center"><a href="/ad_login.php?uid=<?=$row['id']?>&u_name=<?=$row['m_user']?>" target="_blank"><?=$row['m_user']?></a></td>
	  <td align="center"><?=$row['m_cname']?></td>
	  <td align="center"><?=$row['city']?></td>
	  <td align="center"><?=$row['m_name']?></td>
	  <td align="center"><?php if($row['m_addtime']>=date("Y-m-d")){?><font color="#FF0000"><?=$row['m_addtime']?></font><?php }else{?><?=$row['m_addtime']?><?php }?></td>
      <td align="center"><a href="index_modify.php?xg_id=<?=$row['id']?>">编辑</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="index.php?del_act=ok&del_id=<?=$row['id']?>" onClick="return del2()">删除</a></td>
    </tr>
<?php
$i++;}
//分页参数
$rs2=@mysql_query("select count(id) from member where jd_is=1 and m_sh=0  and m_mode=1".$sqls);
$totalrecord=@mysql_result($rs2,0);
$totalpage=ceil($totalrecord/$maxpage);
@mysql_free_result($rs2);
?>

<tr><form method="get" action="<?=$url?>?m_static=<?=$_GET[m_static]?>&m_sh=<?=$_GET[m_sh]?>">
   <td height="25" colspan="7" align="center" bgcolor="#FFFFFF">
<?php if($thepage>1){?>
   <a href="<?=$url?>?m_static=<?=$_GET[m_static]?>&m_sh=<?=$_GET[m_sh]?>">第一页</a>&nbsp;<a href="<?=$url?>?page=<?=$thepage-1?>&m_static=<?=$_GET[m_static]?>&m_sh=<?=$_GET[m_sh]?>">上一页</a>&nbsp;
<?php }?>  
<?php if($thepage!=$totalpage&&$totalpage>0){?>
   <a href="<?=$url?>?page=<?=$thepage+1?>&m_static=<?=$_GET[m_static]?>&m_sh=<?=$_GET[m_sh]?>">下一页</a>&nbsp;<a href="<?=$url?>?page=<?=$totalpage?>&m_static=<?=$_GET[m_static]?>&m_sh=<?=$_GET[m_sh]?>">最后一页</a>&nbsp;
<?php }?>   
   【共<font color="red"><?=$totalrecord?></font>条记录】【每页<font color="red"><?=$maxpage?></font>条记录】【共<font color="red"><?=$totalpage?></font>页】<input type="text" name="page" size="3" onKeyUp="IsDigit(this);">&nbsp;<input type="submit" value="GO"></td></form>
</tr>
  </table>

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><strong style="color:#FF0000">警告</strong>:如果您删除该会员账号，那么该会员的其他信息将被删除。</td>
  </tr>
</table>
</center>
</BODY>
</HTML>
<script language="javascript">
function IsDigit(obj) 
{ 
if(obj.value.replace(/[\d+]/ig,"").length>0) { 
  alert('请输入数字'); 
  document.getElementById(obj).value =""; 
} 
}



function del2(){
if(confirm("删除会员将删除产品和产品分类"))
return true;
else
return false;

}
</script>
